import request from '@/utils/request'
import {download} from '@/utils/request'
import {getNowDate} from '@/utils/tools.js'


// 分页获取活动列表
export function getOrderList(params) {
  return request({
    url: '/system/acddOrder/list',
    method: 'get',
    params
  })
}


// 批量激活
export function batchOrder(data) {
  return request({
    url: `/system/acddOrder/batchActivate`,
    method: 'post',
    data
  })
}

// 导出
export function exportOrder(params, filename) {
  return download('/system/acddOrder/export', params, `${filename}${getNowDate()}.xlsx`)
}


// 作废
export function orderCancellation(id) {
  return request({
    url: `/system/acddOrder/orderCancellation/${id}`,
    method: 'post'
  })
}


// 批量核销
export function batchVerification(data) {
  return request({
    url: `/system/acddOrder/batchVerification`,
    method: 'post',
    data
  })
}